<template>
  <view class="shop-card">
    <view class="flex" @click="gotodetail(item)">
      <image class="cover mr-28" :src="item.imageurl?item.imageurl:item.images" />
      <view class="flex column flex1 py-24">
        <view class="cart-title flex justify-start items-center">
          <view class="tit">{{ item.name }}</view>
        </view>
        <view class="cart-title flex justify-start items-center">
          <view class="desc">{{ item.desc }}</view>
        </view>
        <view class="flex justify-between mt-78">
          <text class="price f-32-B">￥{{ item.price }}</text>
          <!-- <text class="f-28">×1</text> -->
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
const props = defineProps({
  item: {}
});
const gotodetail = (item) => {
  uni.navigateTo({
    url: `/pages/good/details?id=${item.productId}`
  });
};
</script>
<style lang="scss" scoped>
.shop-card {
  background: #fff;

  .img {
    margin-right: 12rpx;
    width: 40rpx;
    height: 40rpx;
    vertical-align: text-bottom;
  }
  .cover {
    width: 240rpx;
    height: 240rpx;
    border-radius: 8rpx;
  }
  .cart-title {

    font-family: PingFang SC;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color:rgba(0, 0, 0, 1) ;
  }
  .desc{
    //styleName: Body/Small;
font-family: PingFang SC;
font-size: 12px;
font-weight: 400;
line-height: 20px;
text-align: left;
text-underline-position: from-font;
text-decoration-skip-ink: none;
color: rgba(0, 0, 0, 0.6);
  }
  .type {
    width: 96rpx;
    text-align: center;
    height: 56rpx;
    line-height: 56rpx;
    background: #6a1b99;
    color: #ffffff;
    border-radius: 12rpx;
  }
  .price {
    //styleName: Body/Medium;
    font-family: PingFang SC;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: rgba(0, 0, 0, 1);
  }
}
</style>
